package com.ruoyi.movie.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.movie.mapper.MovieYearVisitsMapper;
import com.ruoyi.movie.domain.MovieYearVisits;
import com.ruoyi.movie.service.IMovieYearVisitsService;

/**
 * 电影年访问量Service业务层处理
 *
 * @author ruoyi
 * @date 2025-10-28
 */
@Service
public class MovieYearVisitsServiceImpl implements IMovieYearVisitsService
{
    @Autowired
    private MovieYearVisitsMapper movieYearVisitsMapper;

    /**
     * 查询电影年访问量
     *
     * @param id 电影年访问量主键
     * @return 电影年访问量
     */
    @Override
    public MovieYearVisits selectMovieYearVisitsById(Integer id)
    {
        return movieYearVisitsMapper.selectMovieYearVisitsById(id);
    }

    /**
     * 查询电影年访问量列表
     *
     * @param movieYearVisits 电影年访问量
     * @return 电影年访问量
     */
    @Override
    public List<MovieYearVisits> selectMovieYearVisitsList(MovieYearVisits movieYearVisits)
    {
        return movieYearVisitsMapper.selectMovieYearVisitsList(movieYearVisits);
    }

    /**
     * 新增电影年访问量
     *
     * @param movieYearVisits 电影年访问量
     * @return 结果
     */
    @Override
    public int insertMovieYearVisits(MovieYearVisits movieYearVisits)
    {
        return movieYearVisitsMapper.insertMovieYearVisits(movieYearVisits);
    }

    /**
     * 修改电影年访问量
     *
     * @param movieYearVisits 电影年访问量
     * @return 结果
     */
    @Override
    public int updateMovieYearVisits(MovieYearVisits movieYearVisits)
    {
        return movieYearVisitsMapper.updateMovieYearVisits(movieYearVisits);
    }

    /**
     * 批量删除电影年访问量
     *
     * @param ids 需要删除的电影年访问量主键
     * @return 结果
     */
    @Override
    public int deleteMovieYearVisitsByIds(Integer[] ids)
    {
        return movieYearVisitsMapper.deleteMovieYearVisitsByIds(ids);
    }

    /**
     * 删除电影年访问量信息
     *
     * @param id 电影年访问量主键
     * @return 结果
     */
    @Override
    public int deleteMovieYearVisitsById(Integer id)
    {
        return movieYearVisitsMapper.deleteMovieYearVisitsById(id);
    }

    /**
     * 根据影视ID删除年访问量
     *
     * @param movieBasicsId 影视基础ID
     * @return 结果
     */
    @Override
    public int deleteMovieYearVisitsByMovieBasicsId(Integer movieBasicsId)
    {
        return movieYearVisitsMapper.deleteMovieYearVisitsByMovieBasicsId(movieBasicsId);
    }

    /**
     * 根据影视ID查询年访问量列表
     *
     * @param movieBasicsId 影视基础ID
     * @return 电影年访问量集合
     */
    @Override
    public List<MovieYearVisits> selectMovieYearVisitsListByMovieBasicsId(Integer movieBasicsId)
    {
        return movieYearVisitsMapper.selectMovieYearVisitsListByMovieBasicsId(movieBasicsId);
    }
}
